﻿using System;

namespace CommonExceptioin
{
    /// <summary>
    /// 异常策略
    /// </summary>
    public interface IExceptionPolicy
    {

        /// <summary>
        /// return false if the exception should be rethrown by the caller 
        /// 由系统直接去处理的异常，它可以会被日志系统记录，但不会抛出
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="exception"></param>
        /// <returns></returns>
        bool HandlerException(object sender, Exception exception);
    }
}
